import request from './request'

/**
 * 分页查询操作日志
 */
export const getOpLogList = (params) => {
  return request({
    url: '/op-log/page',
    method: 'get',
    params
  })
}

/**
 * 查询用户操作日志
 */
export const getUserOpLogs = (userId, pageNum = 1, pageSize = 10) => {
  return request({
    url: `/op-log/user/${userId}`,
    method: 'get',
    params: { pageNum, pageSize }
  })
}

/**
 * 获取操作日志详情
 */
export const getOpLogDetail = (id) => {
  return request({
    url: `/op-log/${id}`,
    method: 'get'
  })
}

